package com.sina.interfaces.test.util;

/**
 * created  on 19/07/2017.
 */
public abstract class ArrayUtils {

    private static final String[] EMPTY_STRING_ARRAY = new String[0];




    private ArrayUtils(){

    }

    public static String[] mergeArray(String[]... arrayArs){

        if(arrayArs == null){
            return EMPTY_STRING_ARRAY;
        }
        int length = 0;
        for (String[] strArray : arrayArs) {
            length += strArray.length;
        }
        String[] array = new String[length];
        int i = 0;
        for (String[] arrayAr : arrayArs) {
            for (String s : arrayAr) {
                array[i] = s;
                i ++;
            }
        }
        return array;
    }
}
